import { defineStore } from "pinia"

export const useEqDetailStore = defineStore({
    id: 'EqDetailStor',
    state: () => ({
        show: false,
        infoItem: [],
        eqName: '',
        eqId: '',
        estatus: '',
        location: ''
    }),
    actions: {
        async SetShow(show: any) {

            this.$patch({
                show: show,
            });
        },
        async setinfoItem(item: any) {

            this.$patch({
                infoItem: item,
            });
        },
        async SetEqName(name: any) {

            this.$patch({
                eqName: name,
            });
        },
        async SetEqId(id: any) {

            this.$patch({
                eqId: id,
            });
        },
        async Setestatus(status: any) {
            this.$patch({
                estatus: status
            })
        },
        async Setlocation(location: any) {
            this.$patch({
                location: location
            })
        },
    },
})